#pragma once

#include<iostream>
#include <sys/types.h>
#include <fcntl.h>
#include<unistd.h>
#include<string>
#include <sys/stat.h>
#include<vector>
#include<string>
#include<cstring>
#define MX 1000
#define FLUSH_NONE 0
#define FLUSH_LINE 1
#define FLUSH_FULL 2

struct IO_FILE{
    int flag;
    int fileno;
    std::string outbuffer;
    IO_FILE():flag(0),fileno(0),size(0){
        outbuffer.resize(MX,0);
    }
    int size;
};
IO_FILE* myopen(const std::string filename,std::string mod);
int mywrite(const char* ptr,int sz,IO_FILE* filename);
//int myread();
int myfflush(IO_FILE* filename);
int myclose(IO_FILE* filename);

